# -*- coding: UTF-8 -*-
from server.model import Base
from sqlalchemy.sql.functions import now
from sqlalchemy import Column, String, DateTime, BigInteger, SmallInteger


class SysBaseMenus(Base):
    __tablename__ = 'sys_base_menus'
    id = Column(BigInteger, primary_key=True, nullable=False, doc='')
    parent_id = Column(String(191),    doc='父菜单ID')
    path = Column(String(191),    doc='路由path')
    name = Column(String(191),    doc='路由name')
    hidden = Column(SmallInteger,    doc='是否在列表隐藏')
    component = Column(String(191),    doc='对应前端文件路径')
    sort = Column(BigInteger,    doc='对应前端文件路径')
    keep_alive = Column(SmallInteger,    doc='排序标记')
    default_menu = Column(SmallInteger,    doc='附加属性')
    title = Column(String(191),    doc='附加属性')
    icon = Column(String(191),    doc='附加属性')
    close_tab = Column(SmallInteger,    doc='附加属性')
    created_at = Column(DateTime,   default=now(), doc='')
    updated_at = Column(DateTime,   default=now(), doc='')
    deleted_at = Column(DateTime,  index = True,    doc='')